package com.gitee.cirnochat.common.config;

import com.gitee.cirnochat.chatai.model.dto.lke.TencentCloudLkeOptions;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Setter
@ConfigurationProperties(prefix = "tencentcloud.lke.client")
public class DeepDuckChatClientConfig {
    private String sseUrl; // SSE连接的基础URL
    private String wsUrl; // WebSocket连接的基础URL
    private String wsCompletionsPath; // WebSocket连接的推理路径

    @Bean
    public TencentCloudLkeOptions tencentCloudLkeOptions() {
        TencentCloudLkeOptions options = new TencentCloudLkeOptions();
        options.setSseUrl(sseUrl);
        options.setWsUrl(wsUrl);
        options.setWsCompletionsPath(wsCompletionsPath);
        return options;
    }

}
